<html><head><title>Opening a Dialog With Program Code</title><meta name="filename" content="text/sbasic/guide/show_dialog"/><help:css-file-link xmlns:help="http://openoffice.org/2000/help"/><!--The CSS style header method for setting styles--><style type="text/css">
p.P1{
}
span.T1{
font-weight:bold;}
</style></head><body>
<p class="P1"/>
<p class="Head1"><help:paragraphinfo state="U" number="1" xmlns:help="http://openoffice.org/2000/help"/><help:key-word value="modules and dialogs; toggle" tag="kw68538_1" xmlns:help="http://openoffice.org/2000/help"/><help:key-word value="examples; show a dialog using program code" tag="kw68538_2" xmlns:help="http://openoffice.org/2000/help"/><help:to-be-embedded Eid="show_dialog" xmlns:help="http://openoffice.org/2000/help"><help:link Id="68538">Opening a Dialog With Program Code</help:link></help:to-be-embedded></p>
<p class="Paragraph"><help:paragraphinfo state="U" number="2" xmlns:help="http://openoffice.org/2000/help"/>In the <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> BASIC window for a dialog that you created, leave the dialog editor by clicking the name tab of the Module that the dialog is assigned to. The name tab is at the bottom of the window.</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="6" xmlns:help="http://openoffice.org/2000/help"/>Enter the following code for a subroutine called <span class="T1">Dialog1Show</span>. In this example, the name of the dialog that you created is "Dialog1":</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="18" xmlns:help="http://openoffice.org/2000/help"/>Without using "LoadDialog" you can call the code as follows:</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="16" xmlns:help="http://openoffice.org/2000/help"/>When you execute this code, "Dialog1" opens. To close the dialog, click the closer (x) on its title bar.</p>